<template>
    <div class="menu">
        <menu-item v-for="menu in menus" :item="menu"></menu-item>
    </div>
</template>
<script>
    import MenuItem from 'components/menu-item.vue';
    import { mapActions } from 'vuex';
    import { mapState } from 'vuex';

    const COMPONENT_NAME = 'menu-list';

    export default {
        name: COMPONENT_NAME,
        data() {
            return {}
        },
        created() {
            this.getMenus();
        },
        components: {
            MenuItem
        },
        computed: {
            ...mapState(['menus'])
        },
        methods: {
            ...mapActions(['getMenus'])
        }
    }
</script>
<style lang="less">
    .menu {
        width: 100%;
    }
</style>
